<%--
  Created by IntelliJ IDEA.
  User: ThinkPad
  Date: 2021/12/11
  Time: 16:58
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>收藏的店铺</title>
    <link rel="stylesheet" type="text/css" href="css/style.css" />
    <link rel="stylesheet" type="text/css" href="css/shopping-mall-index.css" />
    <link rel="stylesheet" type="text/css" href="/SheepShoppingMall/frontEnd/layui/css/layui.css">
    <script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript" src="js/zhonglin.js"></script>
    <script type="text/javascript" src="/SheepShoppingMall/frontEnd/layui/layui.js"></script>
</head>

<body>
<%@ include file="element/top.jsp" %>
<!--内容开始-->
<div class="personal w1200">
    <%@ include file="element/presonMiddleLeftList.jsp" %>
    <div class="shop f-r">
        <div class="shop-con">
            <div class="shop-c-tit">
                <h3>商品收藏</h3>
            </div>
            <style>
                .shop-info ul li{
                    padding-left: 20px;
                    line-height: 100px;
                }
            </style>
            <div class="shop-info">
                <ul>

                </ul>
                <div style="clear:both;"></div>
            </div>
        </div>
        <!--分页-->
        <div id="test1"></div>

        <script>
            window.onload=function(){
                $.ajax({
                    url:'/SheepShoppingMall/CollectionServlet',
                    data:{
                        opr:'sumCountCollection'
                    },
                    success:data => {
                        console.log(data)
                        layui.use('laypage', function(){
                            var laypage = layui.laypage;
                            //执行一个laypage实例
                            laypage.render({
                                elem: 'test1' //注意，这里的 test1 是 ID，不用加 # 号
                                ,count: data //数据总数，从服务端得到
                                ,limit: 5
                                ,jump: function (obj, first){
                                    $.ajax({
                                        url:'/SheepShoppingMall/CollectionServlet',
                                        data:{
                                            opr:'showCollection',
                                            curr:obj.curr,
                                            limit:obj.limit
                                        },
                                        dataType:'json',
                                        success:data=>{
                                            $('.shop-info ul').html('')
                                            for(const item of data){
                                                $('.shop-info ul').append("<li><img width='80' height='80' src='"+item.imgUrl5+"'>"+item.name+"</li>")
                                            }
                                        }
                                    })

                                }
                            });
                        });
                    }
                })
            }


        </script>

    </div>
    <div style="clear:both;"></div>
</div>

<!--底部服务-->
<div class="ft-service">
    <div class="w1200">
        <div class="sv-con-l2 f-l">
            <dl>
                <dt><a href="#">新手上路</a></dt>
                <dd>
                    <a href="#">购物流程</a>
                    <a href="#">在线支付</a>
                </dd>
            </dl>
            <dl>
                <dt><a href="#">配送方式</a></dt>
                <dd>
                    <a href="#">货到付款区域</a>
                    <a href="#">配送费标准</a>
                </dd>
            </dl>
            <dl>
                <dt><a href="#">购物指南</a></dt>
                <dd>
                    <a href="#">常见问题</a>
                    <a href="#">订购流程</a>
                </dd>
            </dl>
            <dl>
                <dt><a href="#">售后服务</a></dt>
                <dd>
                    <a href="#">售后服务保障</a>
                    <a href="#">退款说明</a>
                    <a href="#">新手选购商品总则</a>
                </dd>
            </dl>
            <dl>
                <dt><a href="#">关于我们</a></dt>
                <dd>
                    <a href="#">投诉与建议</a>
                </dd>
            </dl>
            <div style="clear:both;"></div>
        </div>
        <div class="sv-con-r2 f-r">
            <p class="sv-r-tle">187-8660-5539</p>
            <p>周一至周五9:00-17:30</p>
            <p>（仅收市话费）</p>
            <a href="#" class="zxkf">24小时在线客服</a>
        </div>
        <div style="clear:both;"></div>
    </div>
</div>

<!--底部 版权-->
<div class="footer w1200">
    <p>
        <a href="#">关于我们</a><span>|</span>
        <a href="#">友情链接</a><span>|</span>
        <a href="#">宅客微购社区</a><span>|</span>
        <a href="#">诚征英才</a><span>|</span>
        <a href="#">商家登录</a><span>|</span>
        <a href="#">供应商登录</a><span>|</span>
        <a href="#">热门搜索</a><span>|</span>
        <a href="#">宅客微购新品</a><span>|</span>
        <a href="#">开放平台</a>
    </p>
    <p>
        沪ICP备13044278号<span>|</span>合字B1.B2-20130004<span>|</span>营业执照<span>|</span>互联网药品信息服务资格证<span>|</span>互联网药品交易服务资格证
    </p>
</div>
</body>
</html>

